package com.me.web.system.controller;

import com.alibaba.fastjson2.JSONArray;
import com.me.common.config.MeConfig;
import com.me.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页
 *
 * @author me
 */
@RestController
public class SysIndexController
{
    /** 系统基础配置 */
    @Autowired
    private MeConfig meConfig;

//    /**
//     * 访问首页，提示语
//     */
//    @RequestMapping("/")
//    public String index()
//    {
//        return StringUtils.format("欢迎使用{}后台管理框架，当前版本：v{}，请通过前端地址访问。", meConfig.getName(), meConfig.getVersion());
//    }

    @GetMapping("/heat/source/list")
    public AjaxResult heatSourceList()
    {
        String data = "[\n" +
                "{\n" +
                "heatoutletid: \"002001\",\n" +
                "heatoutletname: \"东郊一期\",\n" +
                "gettime: \"2023-11-23 14:52:39\",\n" +
                "cumulativeflow: \"74849267.200000\",\n" +
                "instantaneousflow: \"7220.000000\",\n" +
                "cumulativeheat: \"12371889.600000\",\n" +
                "instantaneousheat: \"1210.000000\",\n" +
                "supplytemp: \"83.50\",\n" +
                "backtemp: \"42.10\",\n" +
                "supplypre: \"0.950000000\",\n" +
                "backpre: \"0.300000000\",\n" +
                "mapx: \"114.65305300000\",\n" +
                "mapy: \"36.57243500000\",\n" +
                "addtime: \"2023-11-23 14:53:08\"\n" +
                "},\n" +
                "{\n" +
                "heatoutletid: \"002002\",\n" +
                "heatoutletname: \"东郊二期\",\n" +
                "gettime: \"2023-11-23 14:52:33\",\n" +
                "cumulativeflow: \"7033346.000000\",\n" +
                "instantaneousflow: \"9100.000000\",\n" +
                "cumulativeheat: \"924084.000000\",\n" +
                "instantaneousheat: \"1215.580000\",\n" +
                "supplytemp: \"77.70\",\n" +
                "backtemp: \"45.00\",\n" +
                "supplypre: \"0.909000000\",\n" +
                "backpre: \"0.187000000\",\n" +
                "mapx: \"114.65305300000\",\n" +
                "mapy: \"36.57243500000\",\n" +
                "addtime: \"2023-11-23 14:53:08\"\n" +
                "},\n" +
                "{\n" +
                "heatoutletid: \"003001\",\n" +
                "heatoutletname: \"马电东线\",\n" +
                "gettime: \"2023-11-23 14:52:35\",\n" +
                "cumulativeflow: \"1141382.900000\",\n" +
                "instantaneousflow: \"3101.810000\",\n" +
                "cumulativeheat: \"190440.900000\",\n" +
                "instantaneousheat: \"521.100000\",\n" +
                "supplytemp: \"81.02\",\n" +
                "backtemp: \"39.14\",\n" +
                "supplypre: \"0.751000000\",\n" +
                "backpre: \"0.242000000\",\n" +
                "mapx: \"114.43275000000\",\n" +
                "mapy: \"36.49736100000\",\n" +
                "addtime: \"2023-11-23 14:53:08\"\n" +
                "},\n" +
                "{\n" +
                "heatoutletid: \"003002\",\n" +
                "heatoutletname: \"马电复线\",\n" +
                "gettime: \"2023-11-23 14:53:03\",\n" +
                "cumulativeflow: \"1503266.100000\",\n" +
                "instantaneousflow: \"4257.000000\",\n" +
                "cumulativeheat: \"243740.200000\",\n" +
                "instantaneousheat: \"699.000000\",\n" +
                "supplytemp: \"80.90\",\n" +
                "backtemp: \"40.50\",\n" +
                "supplypre: \"0.770000000\",\n" +
                "backpre: \"0.250000000\",\n" +
                "mapx: \"114.43275000000\",\n" +
                "mapy: \"36.49736100000\",\n" +
                "addtime: \"2023-11-23 14:53:08\"\n" +
                "},\n" +
                "{\n" +
                "heatoutletid: \"004002\",\n" +
                "heatoutletname: \"邯钢西区\",\n" +
                "gettime: \"2023-11-23 14:52:55\",\n" +
                "cumulativeflow: \"959620.800000\",\n" +
                "instantaneousflow: \"2053.720000\",\n" +
                "cumulativeheat: \"115199.300000\",\n" +
                "instantaneousheat: \"208.590000\",\n" +
                "supplytemp: \"65.36\",\n" +
                "backtemp: \"40.59\",\n" +
                "supplypre: \"0.574000000\",\n" +
                "backpre: \"0.252000000\",\n" +
                "mapx: \"114.43402000000\",\n" +
                "mapy: \"36.61177800000\",\n" +
                "addtime: \"2023-11-23 14:53:08\"\n" +
                "}\n" +
                "]";
        return AjaxResult.success("OK", JSONArray.parse(data));
    }
}
